<?php


namespace App\Http\Validator;


use App\Http\Common\BaserValidate;

class WeeklyValidator extends BaserValidate
{
    protected $rule = [
        'title'     =>  'required|between:1, 50',
        'content'   =>  'required',
        'label'     =>  'required',
        'edit'      =>  'required',
        'text'      =>  'required'
    ];

    protected $message = [
        'title.required'    =>  '标题不能为空',
        'title.between'     =>  '标题只能在1-50位之间',
        'date.required'     =>  '日期不能为空',
        'content.required'  =>  '内容不能为空',
        'label.required'    =>  '周报标签不能为空',
        'edit.required'     =>  '编辑内容不能为空',
        'text.required'     =>  'text不能为空'
    ];

    protected $scene = [
        'addWeekly'     =>  ['title', 'content', 'label', 'edit', 'text']
    ];
}
